﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media.Imaging;

namespace LFMTest.WinRT.Converters
{
    public class UriToSourceConverter : IValueConverter
    {
        public object Convert(object value, string typeName, object parameter, string language)
        {
            try
            {
                Uri source = (Uri)value;
                return source.ToString();
            }
            catch (Exception)
            {
                return null;
            }
        }

        public object ConvertBack(object value, string typeName, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}